﻿namespace IPTableAdapters
{
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.ComponentModel.Design;
    using System.Configuration;
    using System.Data;
    using System.Data.Common;
    using System.Data.SqlClient;
    using System.Diagnostics;

    [HelpKeyword("vs.data.TableAdapter"), DesignerCategory("code"), DataObject(true), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), ToolboxItem(true)]
    public class ProjectExpensesTableAdapter : Component
    {
        private SqlDataAdapter _adapter;
        private bool _clearBeforeFill;
        private SqlCommand[] _commandCollection;
        private SqlConnection _connection;

        /*[DebuggerNonUserCode]*/
        public ProjectExpensesTableAdapter()
        {
            this.ClearBeforeFill = true;
        }

        [DebuggerNonUserCode, HelpKeyword("vs.data.TableAdapter"), DataObjectMethod(DataObjectMethodType.Delete, true)]
        public virtual int Delete(bool IsDelete, string DeleteBy, string DeleteIP, string Original_ProjectCode, string Original_InvoiceNumber)
        {
            int ret;

            this.Adapter.DeleteCommand.Parameters[0].Value = IsDelete;

            if (DeleteBy == null)
            {
                throw new ArgumentNullException("DeleteBy");
            }
            this.Adapter.DeleteCommand.Parameters[1].Value = DeleteBy;

            if (DeleteIP == null)
            {
                this.Adapter.DeleteCommand.Parameters[2].Value = DBNull.Value;
            }
            else
            {
                this.Adapter.DeleteCommand.Parameters[2].Value = DeleteIP;
            }

            if (Original_ProjectCode == null)
            {
                throw new ArgumentNullException("Original_ProjectCode");
            }
            this.Adapter.DeleteCommand.Parameters[3].Value = Original_ProjectCode;
            if (Original_InvoiceNumber == null)
            {
                throw new ArgumentNullException("Original_InvoiceNumber");
            }
            this.Adapter.DeleteCommand.Parameters[4].Value = Original_InvoiceNumber;
            ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            if ((this.Adapter.DeleteCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
            {
                this.Adapter.DeleteCommand.Connection.Open();
            }
            try
            {
                ret = this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally
            {
                if (previousConnectionState == ConnectionState.Closed)
                {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
            return ret;
        }

        [HelpKeyword("vs.data.TableAdapter"), DebuggerNonUserCode, DataObjectMethod(DataObjectMethodType.Select, true)]
        public virtual IP.ProjectExpensesDataTable GetExpensesByProjectCode(string ProjectCode, bool SuperUser, string OwnerGroupID)
        {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if (ProjectCode == null)
            {
                throw new ArgumentNullException("ProjectCode");
            }
            this.Adapter.SelectCommand.Parameters[0].Value = ProjectCode;
            this.Adapter.SelectCommand.Parameters[1].Value = SuperUser;
            if (OwnerGroupID == null)
            {
                throw new ArgumentNullException("OwnerGroupID");
            }
            this.Adapter.SelectCommand.Parameters[2].Value = OwnerGroupID;
            IP.ProjectExpensesDataTable dataTable = new IP.ProjectExpensesDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }

        [HelpKeyword("vs.data.TableAdapter"), DebuggerNonUserCode, DataObjectMethod(DataObjectMethodType.Select, true)]
        public virtual IP.ProjectExpensesDataTable GetIsDeleteExpensesByProjectCode(string ProjectCode, bool SuperUser, string OwnerGroupID, bool IsDelete)
        {
            this.Adapter.SelectCommand = this.CommandCollection[1];
            if (ProjectCode == null)
            {
                throw new ArgumentNullException("ProjectCode");
            }
            this.Adapter.SelectCommand.Parameters[0].Value = ProjectCode;
            this.Adapter.SelectCommand.Parameters[1].Value = SuperUser;
            if (OwnerGroupID == null)
            {
                throw new ArgumentNullException("OwnerGroupID");
            }

            this.Adapter.SelectCommand.Parameters[2].Value = OwnerGroupID;

            this.Adapter.SelectCommand.Parameters[3].Value = IsDelete;

            IP.ProjectExpensesDataTable dataTable = new IP.ProjectExpensesDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }

        /*[DebuggerNonUserCode]*/
        private void InitAdapter()
        {
            this._adapter = new SqlDataAdapter();
            DataTableMapping tableMapping = new DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "ProjectExpenses";
            tableMapping.ColumnMappings.Add("ProjectCode", "ProjectCode");
            tableMapping.ColumnMappings.Add("InvoiceNumber", "InvoiceNumber");
            tableMapping.ColumnMappings.Add("ReferenceDate", "ReferenceDate");
            tableMapping.ColumnMappings.Add("ChargeFrom", "ChargeFrom");
            tableMapping.ColumnMappings.Add("Description", "Description");
            tableMapping.ColumnMappings.Add("ServiceCharge", "ServiceCharge");
            tableMapping.ColumnMappings.Add("CreateBy", "CreateBy");
            tableMapping.ColumnMappings.Add("UpdateBy", "UpdateBy");
            tableMapping.ColumnMappings.Add("OwnerGroupID", "OwnerGroupID");
            tableMapping.ColumnMappings.Add("CreateIP", "CreateIP");
            tableMapping.ColumnMappings.Add("UpdateIP", "UpdateIP");
            tableMapping.ColumnMappings.Add("IsDelete", "IsDelete");
            tableMapping.ColumnMappings.Add("DeleteBy", "DeleteBy");
            tableMapping.ColumnMappings.Add("DeleteIP", "DeleteIP");
            this._adapter.TableMappings.Add(tableMapping);
            this._adapter.DeleteCommand = new SqlCommand();
            this._adapter.DeleteCommand.Connection = this.Connection;
            //this._adapter.DeleteCommand.CommandText = "DELETE FROM [ProjectExpenses] WHERE (([ProjectCode] = @Original_ProjectCode) AND ([InvoiceNumber] = @Original_InvoiceNumber))";
            this._adapter.DeleteCommand.CommandText = "UPDATE [ProjectExpenses] SET IsDelete = @IsDelete,DeleteBy = @DeleteBy,DeleteDate = GETDATE(), DeleteIP = @DeleteIP WHERE (([ProjectCode] = @Original_ProjectCode) AND ([InvoiceNumber] = @Original_InvoiceNumber)) ";
            this._adapter.DeleteCommand.CommandType = CommandType.Text;
            this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@IsDelete", SqlDbType.Bit, 1, ParameterDirection.Input, 0, 0, "IsDelete", DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@DeleteBy", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "DeleteBy", DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@DeleteIP", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "DeleteIP", DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_ProjectCode", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "ProjectCode", DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_InvoiceNumber", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "InvoiceNumber", DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.InsertCommand = new SqlCommand();
            this._adapter.InsertCommand.Connection = this.Connection;
            this._adapter.InsertCommand.CommandText = "INSERT INTO     ProjectExpenses\r\n                                  (ProjectCode, InvoiceNumber, ReferenceDate, ChargeFrom, Description, ServiceCharge, CreateBy, UpdateBy, OwnerGroupID, CreateIP)\r\nVALUES                (@ProjectCode,@InvoiceNumber,@ReferenceDate,@ChargeFrom,@Description,@ServiceCharge,@CreateBy,@UpdateBy,@OwnerGroupID, @CreateIP)";
            this._adapter.InsertCommand.CommandType = CommandType.Text;
            this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ProjectCode", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "ProjectCode", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@InvoiceNumber", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "InvoiceNumber", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ReferenceDate", SqlDbType.DateTime, 8, ParameterDirection.Input, 0, 0, "ReferenceDate", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChargeFrom", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "ChargeFrom", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Description", SqlDbType.NVarChar, 200, ParameterDirection.Input, 0, 0, "Description", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ServiceCharge", SqlDbType.Decimal, 13, ParameterDirection.Input, 0x15, 10, "ServiceCharge", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@CreateBy", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "CreateBy", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UpdateBy", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "UpdateBy", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OwnerGroupID", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "OwnerGroupID", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@CreateIP", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "CreateIP", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand = new SqlCommand();
            this._adapter.UpdateCommand.Connection = this.Connection;
            this._adapter.UpdateCommand.CommandText = "UPDATE                ProjectExpenses\r\nSET                          ReferenceDate = @ReferenceDate, ChargeFrom = @ChargeFrom, Description = @Description, ServiceCharge = @ServiceCharge, \r\n                                  UpdateBy = @UpdateBy, UpdateIP = @UpdateIP \r\nWHERE                   (ProjectCode = @Original_ProjectCode) AND (InvoiceNumber = @Original_InvoiceNumber)";
            this._adapter.UpdateCommand.CommandType = CommandType.Text;
            this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ReferenceDate", SqlDbType.DateTime, 8, ParameterDirection.Input, 0, 0, "ReferenceDate", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChargeFrom", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "ChargeFrom", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Description", SqlDbType.NVarChar, 200, ParameterDirection.Input, 0, 0, "Description", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ServiceCharge", SqlDbType.Decimal, 13, ParameterDirection.Input, 0x15, 10, "ServiceCharge", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UpdateBy", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "UpdateBy", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UpdateIP", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "UpdateIP", DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_ProjectCode", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "ProjectCode", DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_InvoiceNumber", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "InvoiceNumber", DataRowVersion.Original, false, null, "", "", ""));
        }

        /*[DebuggerNonUserCode]*/
        private void InitCommandCollection()
        {
            this._commandCollection = new SqlCommand[2];
            this._commandCollection[0] = new SqlCommand();
            this._commandCollection[0].Connection = this.Connection;
            this._commandCollection[0].CommandText = "SELECT                  ProjectCode, InvoiceNumber, ReferenceDate, ChargeFrom, Description, ServiceCharge, CreateBy, UpdateBy, OwnerGroupID, IsDelete \r\nFROM                     ProjectExpenses\r\nWHERE                   (((ProjectCode = @ProjectCode) AND (@SuperUser = 1)) OR ((ProjectCode = @ProjectCode) AND (OwnerGroupID = @OwnerGroupID  AND IsDelete = 0 )))";
            this._commandCollection[0].CommandType = CommandType.Text;
            this._commandCollection[0].Parameters.Add(new SqlParameter("@ProjectCode", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "ProjectCode", DataRowVersion.Current, false, null, "", "", ""));
            this._commandCollection[0].Parameters.Add(new SqlParameter("@SuperUser", SqlDbType.Bit, 0x400, ParameterDirection.Input, 0, 0, "", DataRowVersion.Current, false, null, "", "", ""));
            this._commandCollection[0].Parameters.Add(new SqlParameter("@OwnerGroupID", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "OwnerGroupID", DataRowVersion.Current, false, null, "", "", ""));

            this._commandCollection[1] = new SqlCommand();
            this._commandCollection[1].Connection = this.Connection;
            this._commandCollection[1].CommandText = "SELECT                  ProjectCode, InvoiceNumber, ReferenceDate, ChargeFrom, Description, ServiceCharge, CreateBy, UpdateBy, OwnerGroupID, IsDelete,UpdateIP,DeleteIP,DeleteBy,DeleteDate,UpdateDate \r\nFROM                     ProjectExpenses\r\nWHERE                   (((ProjectCode = @ProjectCode) AND (@SuperUser = 1)) OR ((ProjectCode = @ProjectCode) AND (OwnerGroupID = @OwnerGroupID  AND IsDelete = 0 ))) AND (IsDelete = @IsDelete) ";
            this._commandCollection[1].CommandType = CommandType.Text;
            this._commandCollection[1].Parameters.Add(new SqlParameter("@ProjectCode", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "ProjectCode", DataRowVersion.Current, false, null, "", "", ""));
            this._commandCollection[1].Parameters.Add(new SqlParameter("@SuperUser", SqlDbType.Bit, 0x400, ParameterDirection.Input, 0, 0, "", DataRowVersion.Current, false, null, "", "", ""));
            this._commandCollection[1].Parameters.Add(new SqlParameter("@OwnerGroupID", SqlDbType.NVarChar, 60, ParameterDirection.Input, 0, 0, "OwnerGroupID", DataRowVersion.Current, false, null, "", "", ""));
            this._commandCollection[1].Parameters.Add(new SqlParameter("@IsDelete", SqlDbType.Bit, 1, ParameterDirection.Input, 0, 0, "IsDelete", DataRowVersion.Current, false, null, "", "", ""));
        }

        /*[DebuggerNonUserCode]*/
        private void InitConnection()
        {
            this._connection = new SqlConnection();
            this._connection.ConnectionString = ConfigurationManager.ConnectionStrings["LocalSqlConnection1"].ConnectionString;
        }

        [DataObjectMethod(DataObjectMethodType.Insert, true), DebuggerNonUserCode, HelpKeyword("vs.data.TableAdapter")]
        public virtual int Insert(string ProjectCode, string InvoiceNumber, DateTime ReferenceDate, string ChargeFrom, string Description, decimal ServiceCharge, string CreateBy, string UpdateBy, string OwnerGroupID, string CreateIP)
        {
            int ret;
            if (ProjectCode == null)
            {
                throw new ArgumentNullException("ProjectCode");
            }
            this.Adapter.InsertCommand.Parameters[0].Value = ProjectCode;
            if (InvoiceNumber == null)
            {
                throw new ArgumentNullException("InvoiceNumber");
            }
            this.Adapter.InsertCommand.Parameters[1].Value = InvoiceNumber;
            this.Adapter.InsertCommand.Parameters[2].Value = ReferenceDate;
            if (ChargeFrom == null)
            {
                throw new ArgumentNullException("ChargeFrom");
            }
            this.Adapter.InsertCommand.Parameters[3].Value = ChargeFrom;
            if (Description == null)
            {
                this.Adapter.InsertCommand.Parameters[4].Value = DBNull.Value;
            }
            else
            {
                this.Adapter.InsertCommand.Parameters[4].Value = Description;
            }
            this.Adapter.InsertCommand.Parameters[5].Value = ServiceCharge;
            if (CreateBy == null)
            {
                throw new ArgumentNullException("CreateBy");
            }
            this.Adapter.InsertCommand.Parameters[6].Value = CreateBy;
            if (UpdateBy == null)
            {
                throw new ArgumentNullException("UpdateBy");
            }
            this.Adapter.InsertCommand.Parameters[7].Value = UpdateBy;
            if (OwnerGroupID == null)
            {
                throw new ArgumentNullException("OwnerGroupID");
            }
            this.Adapter.InsertCommand.Parameters[8].Value = OwnerGroupID;

            if (CreateIP == null)
            {
                this.Adapter.InsertCommand.Parameters[9].Value = DBNull.Value;
            }
            else
            {
                this.Adapter.InsertCommand.Parameters[9].Value = CreateIP;
            }

            ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            if ((this.Adapter.InsertCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
            {
                this.Adapter.InsertCommand.Connection.Open();
            }
            try
            {
                ret = this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally
            {
                if (previousConnectionState == ConnectionState.Closed)
                {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
            return ret;
        }

        [DebuggerNonUserCode, HelpKeyword("vs.data.TableAdapter")]
        public virtual int Update(IP dataSet)
        {
            return this.Adapter.Update(dataSet, "ProjectExpenses");
        }

        [DebuggerNonUserCode, HelpKeyword("vs.data.TableAdapter")]
        public virtual int Update(DataRow[] dataRows)
        {
            return this.Adapter.Update(dataRows);
        }

        [HelpKeyword("vs.data.TableAdapter"), DebuggerNonUserCode]
        public virtual int Update(IP.ProjectExpensesDataTable dataTable)
        {
            return this.Adapter.Update(dataTable);
        }

        [HelpKeyword("vs.data.TableAdapter"), DebuggerNonUserCode]
        public virtual int Update(DataRow dataRow)
        {
            return this.Adapter.Update(new DataRow[] { dataRow });
        }

        [DebuggerNonUserCode, HelpKeyword("vs.data.TableAdapter"), DataObjectMethod(DataObjectMethodType.Update, true)]
        public virtual int Update(DateTime ReferenceDate, string ChargeFrom, string Description, decimal ServiceCharge, string UpdateBy, string UpdateIP, string Original_ProjectCode, string Original_InvoiceNumber)
        {
            int ret;
            this.Adapter.UpdateCommand.Parameters[0].Value = ReferenceDate;
            if (ChargeFrom == null)
            {
                throw new ArgumentNullException("ChargeFrom");
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ChargeFrom;
            if (Description == null)
            {
                this.Adapter.UpdateCommand.Parameters[2].Value = DBNull.Value;
            }
            else
            {
                this.Adapter.UpdateCommand.Parameters[2].Value = Description;
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ServiceCharge;
            if (UpdateBy == null)
            {
                throw new ArgumentNullException("UpdateBy");
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = UpdateBy;

            if (UpdateIP == null)
            {
                this.Adapter.UpdateCommand.Parameters[5].Value = DBNull.Value;
            }
            else
            {
                this.Adapter.UpdateCommand.Parameters[5].Value = UpdateIP;
            }

            if (Original_ProjectCode == null)
            {
                throw new ArgumentNullException("Original_ProjectCode");
            }
            this.Adapter.UpdateCommand.Parameters[6].Value = Original_ProjectCode;
            if (Original_InvoiceNumber == null)
            {
                throw new ArgumentNullException("Original_InvoiceNumber");
            }
            this.Adapter.UpdateCommand.Parameters[7].Value = Original_InvoiceNumber;
            ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            if ((this.Adapter.UpdateCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
            {
                this.Adapter.UpdateCommand.Connection.Open();
            }
            try
            {
                ret = this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally
            {
                if (previousConnectionState == ConnectionState.Closed)
                {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
            return ret;
        }

        /*[DebuggerNonUserCode]*/
        private SqlDataAdapter Adapter
        {
            get
            {
                if (this._adapter == null)
                {
                    this.InitAdapter();
                }
                return this._adapter;
            }
        }

        /*[DebuggerNonUserCode]*/
        public bool ClearBeforeFill
        {
            get
            {
                return this._clearBeforeFill;
            }
            set
            {
                this._clearBeforeFill = value;
            }
        }

        /*[DebuggerNonUserCode]*/
        protected SqlCommand[] CommandCollection
        {
            get
            {
                if (this._commandCollection == null)
                {
                    this.InitCommandCollection();
                }
                return this._commandCollection;
            }
        }

        /*[DebuggerNonUserCode]*/
        internal SqlConnection Connection
        {
            get
            {
                if (this._connection == null)
                {
                    this.InitConnection();
                }
                return this._connection;
            }
            set
            {
                this._connection = value;
                if (this.Adapter.InsertCommand != null)
                {
                    this.Adapter.InsertCommand.Connection = value;
                }
                if (this.Adapter.DeleteCommand != null)
                {
                    this.Adapter.DeleteCommand.Connection = value;
                }
                if (this.Adapter.UpdateCommand != null)
                {
                    this.Adapter.UpdateCommand.Connection = value;
                }
                for (int i = 0; i < this.CommandCollection.Length; i++)
                {
                    if (this.CommandCollection[i] != null)
                    {
                        this.CommandCollection[i].Connection = value;
                    }
                }
            }
        }
    }
}

